/*
 * RecordDuplicatedException.h
 *
 *  Created on: Oct 9, 2012
 *      Author: romina
 */

#ifndef RECORDDUPLICATEDEXCEPTION_H_
#define RECORDDUPLICATEDEXCEPTION_H_


#include <string>
#include <exception>

using namespace std;

class RecordDuplicatedException: public exception
{
private:
  string mensaje;
public:

  RecordDuplicatedException(string message):exception(){
	  this->mensaje = message;
  }

  virtual const char* what() const throw()
  {
	if (this->mensaje.empty())
		return "El registro ya existe.";
	return this->mensaje.c_str();
  }

  virtual ~RecordDuplicatedException() throw(){}
};


#endif /* RECORDDUPLICATEDEXCEPTION_H_ */
